package pl.edu.mimuw.irs.rcp.view.navigation;

import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;

public class TreeObject {
	
	// *** Attributes
	
	private String name;
	private TreeParent parent;
	
	// *** Constructors
	
	public TreeObject(String name) {
		this.name = name;
	}
	
	// *** Methods
	
	public String getName() {
		return name;
	}
	public void setParent(TreeParent parent) {
		this.parent = parent;
	}
	public TreeParent getParent() {
		return parent;
	}
	public String toString() {
		return getName();
	}
	public Image getIcon() {
		String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
		return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
	}
}
